<template>
	<el-card class="form-container">
		<el-form :model="goodsSpuDetail" label-width="100px">
			<el-form-item label="spu名称" prop="spuName">
				<el-input v-model="goodsSpuDetail.spuName" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="spu副标题" prop="spuCaption">
				<el-input v-model="goodsSpuDetail.spuCaption" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="品牌编号" prop="brandCode">
				<el-input v-model="goodsSpuDetail.brandCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="一级商品分类编号" prop="categoryCode">
				<el-input v-model="goodsSpuDetail.categoryCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="模版编号" prop="templateCode">
				<el-input v-model="goodsSpuDetail.templateCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="运费模版编号" prop="freightCode">
				<el-input v-model="goodsSpuDetail.freightCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="主图" prop="masterImage">
				<el-input v-model="goodsSpuDetail.masterImage" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="图片列表:轮播图" prop="rotateImageList">
				<el-input v-model="goodsSpuDetail.rotateImageList" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="商品描述,详情" prop="goodsDesc">
				<el-input v-model="goodsSpuDetail.goodsDesc" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="规格列表" prop="specItems">
				<el-input v-model="goodsSpuDetail.specItems" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="参数列表" prop="paraItems">
				<el-input v-model="goodsSpuDetail.paraItems" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="销量" prop="salesVolume">
				<el-input v-model="goodsSpuDetail.salesVolume" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="评论量" prop="commentVolume">
				<el-input v-model="goodsSpuDetail.commentVolume" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="上架状态 1.上架 2.未上架" prop="isMarketable">
				<el-input v-model="goodsSpuDetail.isMarketable" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="货号" prop="goodsItemCode">
				<el-input v-model="goodsSpuDetail.goodsItemCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="是否启用规格 1.启用 2.禁用" prop="isEnableSpec">
				<el-input v-model="goodsSpuDetail.isEnableSpec" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="是否删除 1.是 2.否" prop="isDelete">
				<el-input v-model="goodsSpuDetail.isDelete" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="是否需要用户提供度数:仅当散光镜,近视镜,远视镜的时需要提供" prop="userProvidedDegrees">
				<el-input v-model="goodsSpuDetail.userProvidedDegrees" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="spu编号" prop="spuCode">
				<el-input v-model="goodsSpuDetail.spuCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="商品重量(克)" prop="goodsWeight">
				<el-input v-model="goodsSpuDetail.goodsWeight" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="" prop="goodsPrice">
				<el-input v-model="goodsSpuDetail.goodsPrice" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="" prop="goodsUnit">
				<el-input v-model="goodsSpuDetail.goodsUnit" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="商品详情 类别  1.图片格式 2.富文本格式" prop="spuInfoType">
				<el-input v-model="goodsSpuDetail.spuInfoType" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item>
				<el-button @click="close">关闭</el-button>
			</el-form-item>
		</el-form>
	</el-card>
</template>

<script>
	import {
		findGoodsSpuDetail
	} from '@/api/mall/goodsSpu'
	export default {
		name: 'view-goodsSpu',
		data() {
			return {
				goodsSpuDetail: {}
			}
		},
		created() {
			this.view(this.$route.query.id)
		},
		methods: {
			view(val) {
				findGoodsSpuDetail(val).then(res => {
					console.log('查询返回结果', res)
					this.goodsSpuDetail = res.data.responseData
				})
			},
			close() {
				this.$router.go(-1)
			}
		}
	}
</script>

<style>
</style>
